

# 计算毛利率
def calc_mao_li_lv(data1, data2):
    return round(((data1 - data2) / data1) * 100, 2)

# 计算净利率
def calc_jing_li_lv(data1, data2):
    return round((data2 / data1) * 100, 2)

# 计算毛净差
def calc_mao_jing_cha(data1, data2, data3):
    return round(((data1 - data2 - data3)/data1) * 100, 2)

# 总资产收益率ROA
def calc_ROA(data1, data2):
    return round((data2 / data1) * 100, 2)

# 总资产收益率ROA
def calc_ROA(data1, data2):
    return round((data2 / data1) * 100, 2)

# 净资产收益率ROA
def calc_ROE(data1, data2):
    return round((data2 / data1) * 100, 2)